package pl.edu.pw.perg.compinfodb.manager;

import java.util.List;

import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import pl.edu.pw.perg.compinfodb.dao.IPhysicalElementDAO;
import pl.edu.pw.perg.compinfodb.entities.ElementType;
import pl.edu.pw.perg.compinfodb.entities.IPhysicalElement;
import pl.edu.pw.perg.compinfodb.entities.PhysicalElement;

public class PhysicalElementManager extends GenericManager<PhysicalElement> implements
	IPhysicalElementManager  {

	public static String ELEMENT_CATEGORY = "elementCategory";

	@Transactional(readOnly = false, propagation = Propagation.REQUIRED)
	public List<PhysicalElement> findElementsByType(ElementType type){
		return ((IPhysicalElementDAO) getGenericDAO()).findElementsByType(type);
	}

	@Transactional(readOnly = false, propagation = Propagation.REQUIRED)
	public List<PhysicalElement> findSpareElements() {
		return ((IPhysicalElementDAO) getGenericDAO()).findSpareElements();
	}

}
